package daos;

import org.hibernate.SessionFactory;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.springframework.transaction.annotation.Transactional;
import model.TimeSlot;

public class TimeSlotDAOImpl implements TimeSlotDAO {
	private SessionFactory sessionFactory;
	
	@Transactional
	public void save(TimeSlot timeslot){
	Session session = this.sessionFactory.getCurrentSession();
	session.saveOrUpdate(timeslot);
	}

	public SessionFactory getSessionFactory() {
		return sessionFactory;
	}

	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	
}
